Skip to content

Conversation

@sbates-idrc
Copy link
Contributor

@sbates-idrc sbates-idrc commented May 21, 2025

Fixes #547

  • In LanguageSelector, use React.forwardRef() to enable users of LanguageSelector to obtain a ref to the LanguageSelector button
  • Add 2 new instance properties to App: languageSelectorRef, a ref to the language selector (forwarded to the button, as above), and focusLanguageSelector, a boolean to indicate that focus should be set on the language selector
  • Add a new language change handler to App that sets focusLanguageSelector when the language is changed and new code to componentDidUpdate() to check focusLanguageSelector and set focus if requested

* In LanguageSelector, use React.forwardRef() to enable users of
  LanguageSelector to obtain a ref to the LanguageSelector button

* Add 2 new instance properties to App: 'languageSelectorRef', a ref
  to the language selector (forwarded to the button, as above), and
  'focusLanguageSelector', a boolean to indicate that focus should be
  set on the language selector

* Add a new language change handler to App that sets
  'focusLanguageSelector' when the language is changed and new code to
  'componentDidUpdate()' to check 'focusLanguageSelector' and set
  focus if requested
@sbates-idrc sbates-idrc merged commit 1576dd9 into codelearncreate:develop-1.13 May 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants